home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / extrudeSetOptionVars.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  4.4 KB  |  141 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  March 22 1997
  22. //  Author:         rs 
  23. //
  24. //  Description:
  25. //      Global function to ensure the options for extrude are set.
  26. //
  27. //  Input Arguments:
  28. //      Force the factory setting or not.
  29. //
  30. //  Return Value:
  31. //      None.
  32. //
  33.  
  34. global proc extrudeSetOptionVars( 
  35.     int $forceFactorySettings )
  36. //
  37. //
  38. //
  39. {
  40.     // extrudeUseComponentPivot (int) - can be 1|0 for user specified or use 
  41.     // start of path.
  42.     //
  43.     if ($forceFactorySettings || !`optionVar -exists extrudeUseComponentPivot`) {
  44.         optionVar -intValue extrudeUseComponentPivot 0;
  45.     }
  46.  
  47.     // only if user specified.
  48.     //
  49.     if ($forceFactorySettings || !`optionVar -exists extrudeUsePivotX`) {
  50.         optionVar -floatValue extrudeUsePivotX 0.0;
  51.     }
  52.  
  53.     if ($forceFactorySettings || !`optionVar -exists extrudeUsePivotY`) {
  54.         optionVar -floatValue extrudeUsePivotY 0.0;
  55.     }
  56.  
  57.     if ($forceFactorySettings || !`optionVar -exists extrudeUsePivotZ`) {
  58.         optionVar -floatValue extrudeUsePivotZ 0.0;
  59.     }
  60.  
  61.     // extrude style is TUBE(2) by default.
  62.     // other options : distance(0), flat(1).
  63.     //
  64.     if ($forceFactorySettings || !`optionVar -exists extrudeStyle`) {
  65.         optionVar -intValue extrudeStyle 2;
  66.     }
  67.  
  68.     // extrude path fixed or shape (1) fixed.
  69.     //
  70.     if ($forceFactorySettings || !`optionVar -exists extrudePathFixed`) {
  71.         optionVar -intValue extrudePathFixed 0;
  72.     }
  73.  
  74.  
  75.     // use profile normal.
  76.     // Only for distance extrude.
  77.     //
  78.     if ($forceFactorySettings || !`optionVar -exists extrudeUseProfileNormal`) {
  79.         optionVar -intValue extrudeUseProfileNormal 1;
  80.     }
  81.  
  82.  
  83.     // extrude direction.
  84.     // X axis (0), Y axis (1), Z axis (2) & user Defined (3).
  85.     // 
  86.     if ($forceFactorySettings || !`optionVar -exists extrudeDirectionType`) {
  87.         optionVar -intValue extrudeDirectionType 0;
  88.     }
  89.  
  90.     if ($forceFactorySettings || !`optionVar -exists extrudeDirectionX`) {
  91.         optionVar -floatValue extrudeDirectionX 0.0;
  92.     }
  93.     if ($forceFactorySettings || !`optionVar -exists extrudeDirectionY`) {
  94.         optionVar -floatValue extrudeDirectionY 1.0;
  95.     }
  96.     if ($forceFactorySettings || !`optionVar -exists extrudeDirectionZ`) {
  97.         optionVar -floatValue extrudeDirectionZ 0.0;
  98.     }
  99.  
  100.     // extrude length.
  101.     // only for distance style extrude.
  102.     //
  103.     if ($forceFactorySettings || !`optionVar -exists extrudeLength`) {
  104.         optionVar -floatValue extrudeLength 1.0 ;
  105.     }
  106.  
  107.     // extrude rotation
  108.     //
  109.     if ($forceFactorySettings || !`optionVar -exists extrudeRotation`) {
  110.         optionVar -floatValue extrudeRotation 0.0 ;
  111.     }
  112.  
  113.     // extrude scale.
  114.     //
  115.     if ($forceFactorySettings || !`optionVar -exists extrudeScale`) {
  116.         optionVar -floatValue extrudeScale 1.0 ;
  117.     }
  118.  
  119.     // extrudeCurveRangePartial (int) - either 0|1 for using the complete
  120.     // curve or only a partial curve for the operation. 
  121.     //
  122.     if ($forceFactorySettings ||
  123.         !`optionVar -exists extrudeCurveRangePartial`){
  124.         optionVar -intValue extrudeCurveRangePartial 0;
  125.     }
  126.  
  127.     // extrudeOutputPolygons (int) - 0|1 for polygon or Nurbs output
  128.     //
  129.     if ($forceFactorySettings || !`optionVar -exists extrudeOutputPolygons`){
  130.         optionVar -intValue extrudeOutputPolygons 0;
  131.     }
  132.  
  133.     // extrude degree along length.
  134.     // This is only used when a distance extrude is performed
  135.     //
  136.     if ($forceFactorySettings || !`optionVar -exists extrudeDegreeAlongLength`) {
  137.         optionVar -intValue extrudeDegreeAlongLength 3;
  138.     }
  139. }
  140.  
  141.